﻿using System;
using SceneAssist;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x020005D6 RID: 1494
	public class VoiceNode : PointerAction
	{
		// Token: 0x170004B2 RID: 1202
		// (get) Token: 0x06002625 RID: 9765 RVA: 0x000E013C File Offset: 0x000DE33C
		public Button buttonUI
		{
			get
			{
				return this.m_Button;
			}
		}

		// Token: 0x170004B3 RID: 1203
		// (get) Token: 0x06002626 RID: 9766 RVA: 0x000E0144 File Offset: 0x000DE344
		public Text textUI
		{
			get
			{
				return this.m_Text;
			}
		}

		// Token: 0x170004B4 RID: 1204
		// (get) Token: 0x06002627 RID: 9767 RVA: 0x000E014C File Offset: 0x000DE34C
		// (set) Token: 0x06002628 RID: 9768 RVA: 0x000E015C File Offset: 0x000DE35C
		public string text
		{
			get
			{
				return this.m_Text.text;
			}
			set
			{
				this.m_Text.text = value;
			}
		}

		// Token: 0x170004B5 RID: 1205
		// (get) Token: 0x06002629 RID: 9769 RVA: 0x000E016C File Offset: 0x000DE36C
		// (set) Token: 0x0600262A RID: 9770 RVA: 0x000E017C File Offset: 0x000DE37C
		public bool interactable
		{
			get
			{
				return this.m_Button.interactable;
			}
			set
			{
				this.m_Button.interactable = value;
			}
		}

		// Token: 0x170004B6 RID: 1206
		// (get) Token: 0x0600262B RID: 9771 RVA: 0x000E018C File Offset: 0x000DE38C
		// (set) Token: 0x0600262C RID: 9772 RVA: 0x000E019C File Offset: 0x000DE39C
		public bool active
		{
			get
			{
				return base.gameObject.activeSelf;
			}
			set
			{
				if (base.gameObject.activeSelf != value)
				{
					base.gameObject.SetActive(value);
				}
			}
		}

		// Token: 0x170004B7 RID: 1207
		// (set) Token: 0x0600262D RID: 9773 RVA: 0x000E01BC File Offset: 0x000DE3BC
		public UnityAction addOnClick
		{
			set
			{
				this.m_Button.onClick.AddListener(value);
			}
		}

		// Token: 0x0600262E RID: 9774 RVA: 0x000E01D0 File Offset: 0x000DE3D0
		public override void OnPointerEnter(PointerEventData eventData)
		{
			if (!this.interactable)
			{
				return;
			}
			base.OnPointerEnter(eventData);
		}

		// Token: 0x0600262F RID: 9775 RVA: 0x000E01E8 File Offset: 0x000DE3E8
		public virtual void Awake()
		{
			VoiceNode.ClickSound clickSound = this.clickSound;
			if (clickSound == VoiceNode.ClickSound.OK)
			{
				this.addOnClick = delegate()
				{
					Assist.PlayDecisionSE();
				};
			}
		}

		// Token: 0x0400264C RID: 9804
		[SerializeField]
		protected Button m_Button;

		// Token: 0x0400264D RID: 9805
		[SerializeField]
		protected Text m_Text;

		// Token: 0x0400264E RID: 9806
		[SerializeField]
		protected VoiceNode.ClickSound clickSound;

		// Token: 0x020005D7 RID: 1495
		protected enum ClickSound
		{
			// Token: 0x04002651 RID: 9809
			NoSound,
			// Token: 0x04002652 RID: 9810
			OK
		}
	}
}
